import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '产品名称',
    align: "center",
    dataIndex: 'productname'
  },
  {
    title: '产品类型',
    align: "center",
    dataIndex: 'producttype_dictText'
  },
  {
    title: '产品型号',
    align: "center",
    dataIndex: 'productModel'
  },
  {
    title: '版本号',
    align: "center",
    dataIndex: 'version'
  },

  {
    title: '关联企业',
    align: "center",
    dataIndex: 'companyid_dictText'
  },
  {
    title: '图片',
    align: "center",
    dataIndex: 'imageurl',
    customRender: render.renderImage,
  },
  {
    title: '核心技术文档',
    align: "center",
    dataIndex: 'videourl',
  },
  {
    title: '产品规格描述',
    align: "center",
    dataIndex: 'productspecification'
  },
  {
    title: '产品评分',
    align: "center",
    dataIndex: 'productrating'
  },
  {
    title: '产品价格',
    align: "center",
    dataIndex: 'price'
  },

  {
    title: '相关论文',
    align: "center",
    dataIndex: 'paperid_dictText'
  },
  {
    title: '相关专利',
    align: "center",
    dataIndex: 'patentid_dictText'
  },



  {
    title: '技术参数',
    align: "center",
    dataIndex: 'technicalSpecifications'
  },
  {
    title: '产品状态',
    align: "center",
    dataIndex: 'productStatus_dictText'
  },
  {
    title: '轮播图状态',
    align: "center",
    dataIndex: 'slider_dictText',
  },
  {
    title: '上架状态',
    align: "center",
    dataIndex: 'isavailable_dictText'
  },
];

// 高级查询数据
export const superQuerySchema = {
  productname: {title: '产品名称',order: 0,view: 'text', type: 'string',},
  producttype: {title: '产品类型',order: 1,view: 'list_multi', type: 'string',dictCode: 'product_type',},
  companyid: {title: '关联公司',order: 2,view: 'list_multi', type: 'string',dictTable: "jk_company", dictCode: 'id', dictText: 'name',},
  imageurl: {title: '图片',order: 3,view: 'image', type: 'string',},
  videourl: {title: '视频',order: 4,view: 'file', type: 'string',},
  productspecification: {title: '产品规格描述',order: 5,view: 'textarea', type: 'string',},
  productrating: {title: '产品评分',order: 6,view: 'number', type: 'number',},
  productdetails: {title: '产品详细介绍',order: 7,view: 'umeditor', type: 'string',},
  achievementcontent: {title: '成果内容描述',order: 8,view: 'umeditor', type: 'string',},
  price: {title: '产品价格',order: 9,view: 'number', type: 'number',},
  isavailable: {title: '上架状态',order: 10,view: 'radio', type: 'string',dictCode: 'product_status',},
  paperid: {title: '相关论文',order: 11,view: 'number', type: 'number',dictTable: "jk_papers", dictCode: 'id', dictText: 'paper_title',},
  patentid: {title: '相关专利',order: 12,view: 'number', type: 'number',dictTable: "jk_patent_info", dictCode: 'id', dictText: 'patent_title',},
};
